package com.hxqc.basic.mapper;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.ibatis.annotations.Param;

public interface SysUserMapper {

	public Map<String, Object> selectSysUserById(String user_id);

	public List<Map<String, Object>> findAllRightByUser(String user_id);

	public List<Map<String, Object>> findAllRights();

	public void updateUserPwd(Map<String, Object> user);

	public List<Map<String, Object>> findSysUser(Map<String, String> param);

	public Integer countSysUser(Map<String, String> param);

	public List<Map<String, Object>> findSysDept();

	public void insertIntoSysUser(Map<String, Object> param);

	public void insertUserRole(Map<String, Object> param);

	public void updateSysUser(Map<String, Object> param);

	public void deleteSysUser(@Param("user_id") String user_id);

	public void deleteUserRole(@Param("user_id") String user_id);

	public void delDept(@Param("dept_id") String userdept_id_id);

	public List<Map<String, Object>> getDeptByCode(@Param("dept_code") String dept_code);

	public List<Map<String, Object>> getDeptByName(@Param("dept_name") String dept_name);

	public void addDept(Map<String, String> map);

	public List<String> findSysUserRoleByUserId(@Param("user_id") String user_id);

	public List<Map<String, Object>> findSysRole(Map<String, String> map);

	public int countSysRole(Map<String, String> map);

	public void deleteRole(@Param("role_id") String role_id);

	public Map<String, Object> findRoleInfoByRoleCode(@Param("role_code") String role_code);

	public Map<String, Object> findRoleInfoByRoleName(@Param("role_name") String role_name);
	
	public Map<String, Object> findRoleInfoByRoleIdAndName(Map<String,String> map) ;
	
	public void insertRoleInfo(Map<String,Object> map);
	
	public void insertSysRoleRight(@Param("role_id")String role_id,@Param("rights")Set<String> rights);
	
	public Integer countAllRights() ;
	
	public void deleteUserRoleByRole(@Param("role_id") String role_id);
	public void deleteRoleRight(@Param("role_id") String role_id);
	
	public Map<String,Object> findRoleById(@Param("role_id")String role_id);
	
	public List<String> findRightsIdByRoleId(@Param("role_id")String role_id);
	
	public void updateRoleInfo(Map<String,String> map);
	
	public void insertLoginLog(Map<String,Object> map) ;

	public void updateLogoutLogBySessionId(@Param("session_id")String session_id) ;
	public void updateLogoutLog();
}
